from django.db import models


class School(models.Model):
    name = models.CharField(max_length=64, verbose_name='')
    address = models.CharField(max_length=256, verbose_name='地址')

    # owner = models.ForeignKey('auth.User', related_name='schools', on_delete=models.CASCADE)

    class Meta:
        db_table = 'api_school'
        verbose_name = '学校'
        verbose_name_plural = verbose_name
        pass

    pass


class Student(models.Model):
    name = models.CharField(max_length=16)
    sex = models.BooleanField(default=True)
    score = models.IntegerField(default=0, verbose_name='分数')

    is_delete = models.IntegerField(default=0, verbose_name='是否删除')

    class Meta:
        db_table = 'api_student'
        verbose_name = '学生'
        verbose_name_plural = verbose_name
        pass

    pass


class Teacher(models.Model):
    name = models.CharField(max_length=16)
    grade = models.CharField(max_length=16, verbose_name='班级')

    is_delete = models.IntegerField(default=0, verbose_name='是否删除')

    class Meta:
        db_table = 'api_teacher'
        verbose_name = '老师'
        verbose_name_plural = verbose_name
        pass

    pass
